package com.yuebao.feign;

import com.yuebao.model.pojo.Transaction;
import com.yuebao.request.RequestParameter;
import com.yuebao.result.EntityResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(name = "YUEBAO-payment-service",path = "/payment")
public interface PaymentCloud {
    @PostMapping("/pay")
    public EntityResponse<String> handlePayment(@RequestBody @Valid RequestParameter<Transaction> transaction);
}
